library(Rcpp)
library(ggplot2)
library(plotly)
library(tools)
library(data.table)
library(ggpubr)
library(vegan)
# sourceCpp('src/fasta_seq_names.cpp')
# sourceCpp('src/primer_map.cpp')
metadata <- fread('data/DARTE-QM-v3-metadata-fromKathyMou.csv')
metadata[[1]] <- gsub('\\.', '_', metadata[[1]])
categories <- fread('data/category_all.tsv', header = FALSE)
colnames(categories) <- c('Source', 'ARG_Class', 'Primer')
BLAST_table <- readRDS('data/BLAST_table.rds')
expected_mock <- readRDS('data/expected_mock.rds')
primers <- readRDS('data/primers.rds')
read_counts <- readRDS('data/read_counts.rds')
read_counts_unexpected <- readRDS('data/read_counts_unexpected.rds')
read_counts_unexpected <- read_counts_unexpected[!(read_counts_unexpected[[1]] %in% read_counts[[1]])]
spike_counts <- readRDS('data/spike_counts.rds')
BLAST_matrix <- readRDS('data/blast_matrix.rds')
groups <- cbind(metadata$Sample_Name, factor(metadata$Test_for))
soil_column_I_ARGS <- readRDS('data/soil_column_I_ARGs.RDS')
This is created by averaging the number of reads from all samples from a single source, i.e. the average number of reads aligned from soil at each percent identity threshold.
This is the same information as the Percent Identity graph, but represented as the proportion of the total number of reads from the raw FASTQ files.
This is the same information as the Percent Identity graph, but represented as the proportion of the total number of aligned reads. I.E. at each increasing percent identity, the number of reads aligned is divided by the number of reads aligned at 60% (the total number of aligned reads).
We expect qPCR data to be non-normal. If it were normally distributed, I would suspect that the number of primers was affecting the results more than the gene quantity.
98% Identity match for reads of length >= 100 bp seems to be the ideal threshold for number of reads captured compared to confidence in alignment. For subsequent analyses, I used that threshold for determining identified ARGs.
Each primer/ARG genes presented is expected to be found based on the mock.expected.fa file. 75% of the primers expected to bind genes in the mock samples were successful, and detected in the sequencing. 87% of the ARG genes expected to be found in the mock samples were found.
BLAST against mock.expected.fa, compare to mock.expected.fa. Looking to see how many of the known ARGs are detected. Something is wrong with Q3_Mock_0_025spike_C.
Same data, but by individual primer pressence.
Distances were calculated from raw read counts to compare to how normalizing with relative abundance clusters replicates. Without housekeeping genes, we can’t directly compare samples to each other in terms of abundance or expression of certain genes. With relative abundance though, we should be able to compare the ratios.
Using relative abundance to normalize samples clusters the replicates tighter, indicating that it works well overall as a normalization method.